package com.hdax.easybuy.api;

import com.hdax.easybuy.entity.Product;
import com.hdax.easybuy.entity.ProductCategory;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

//@RequestMapping("/managerProduct")
@FeignClient(value = "easybuy-produce-manager")
public interface ProductManagerClient {

    //查看所有的商品
    @RequestMapping("/managerProduct/queryAllProduct")
    //@ResponseBody
    public List<Product> queryAll();
    //根据id查看单个商品
    @RequestMapping("/managerProduct/queryById/{id}")
    //@ResponseBody
    public Product queryById(@PathVariable("id") int id);
    //一级菜单下面所有的商品
    @RequestMapping("/managerProduct/queryProductById/{id}")
    public List<Product> queryProductById(@PathVariable("id") int id);

}
